#!/bin/bash
TMP=$1
p=$2
FLAGS=$3
FILES=$4
if [ "$HEAP_SIZE" = "" ]; then
  HEAP_SIZE=100m
fi
if [ "$JVM_STACK_SIZE" != "" ]; then
  JVM_STACK_SIZE="-Xss$JVM_STACK_SIZE"
fi
v3c-jar -jvm.args="$JVM_STACK_SIZE -server -Xmx$HEAP_SIZE" -output=$TMP $FILES
if [ $? = 0 ]; then
	mv $TMP/${p} $TMP/${p}-jar
	echo $TMP/${p}-jar
else
	exit $?
fi
